#include("/common/_body.html")

#define page_content()
<div class="row">
	<div class="col-xs-2">
		<div class="btn-group">
			#auth_has("dic_save")
			<button type="button" class="btn btn-white btn-sm btn-primary" onclick="addDicM()">添加</button>
			#end
			#auth_has("dic_update")
			<button type="button" class="btn btn-white btn-sm btn-primary" onclick="editDicM()">修改</button>
			#end
			#auth_has("dic_delete")
			<button type="button" class="btn btn-white btn-sm btn-primary" onclick="deleteDicM()">删除</button>
			#end
		</div>
		<div class="space-4"></div>
		<ul id="tt"></ul>
	</div>
	<div class="col-xs-10">
		<h4 class="blue bolder smaller">给字典【<b id="dic_value"></b>:<b id="dic_code"></b>】添加字典项</h4>
		<div class="row">
			<div class="col-sm-12 search-collapse">
				<form id="sff" class="form-inline">
					<input type="hidden" name="item.dic_id" id="srh_dic_id" value="">
					<div class="form-group">
						<label class="control-label">字典项键</label>
						<input type="text" class="form-control stext" id="srh_item_code" name="item.item_code">
					</div>
					<div class="form-group">
						<a class="btn btn-success btn-sm no-border btn-round" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
					    <a class="btn btn-warning btn-sm no-border btn-round" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
					</div>
				</form>
	    	</div>
		    <div id="toolbar">
		    	#auth_has("dic_save")
		       	<a class="btn btn-info btn-xs no-border" onclick="$.table.add()">
					<i class="fa fa-plus"></i> 添加项
				</a>
				#end
				#auth_has("dic_update")
		        <a class="btn btn-success btn-xs no-border disabled btn-edit" onclick="$.table.edit()">
		            <i class="fa fa-edit"></i> 修改项
		        </a>
		        #end
		        #auth_has("dic_delete")
		        <a class="btn btn-danger btn-xs no-border disabled btn-del" onclick="$.table.removeAll()">
		        	<i class="fa fa-remove"></i> 删除项
		        </a>
		        #end
		        #auth_has("dic_save")
		       	<a class="btn btn-info btn-xs no-border" onclick="copyM()">
					<i class="fa fa-copy"></i> JSON键值对
				</a>
				#end
		    </div>
		    <div class="col-sm-12 select-table">
				<table id="ey_grid" style="min-height:400px;">
			        <thead>
			            <tr>
			            	<th data-options="field:'ck',checkbox:true"></th>
			                <th data-options="field:'id',hidden:true,width:80">ID</th>
			                <th data-options="field:'item_code',width:80">字典项键</th>
			                <th data-options="field:'item_value',width:100">字典项值</th>
			                <th data-options="field:'item_order',width:40">排序号</th>
			                <th data-options="field:'memo',width:100">描述</th>
			            </tr>
			        </thead>
			    </table>
			</div>
		</div>
	</div>
	<div id="dlg"></div> 
</div>
#end

#define js()
<script src="#(path)/ace/js/jquery.zclip.min.js"></script>
<script src="#(path)/js/templates/pdc/dic_list.js"></script>
#end